<?php
/*
 * @Author: your name
 * @Date: 2021-12-07 09:50:02
 * @LastEditTime: 2022-01-05 10:55:23
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \property\app\Http\Controllers\find_shop\User.php
 */

namespace App\Http\Controllers\find_shop;
use Illuminate\Support\Facades\Request;
use App\Models\admin_model\FreeDistribution as FreeDistributionDb;
class Rental extends BaseController{
      
        //免费发布
        public function freeDistribution(){
                if(Request::has("formData")){
                    $formData = Request::input('formData');
                    $formData['user_openid'] = $this->getLoginMsg();
                    $res =  redis_mysql_add_return("free_distribution",$formData)  ; 
                    if($res){
                        return   $this->create(200, '发布成功');
                    }
                }
        }

        public function freeDistributionList(){
                $openid =   $this->getLoginMsg();
                return   $this->create(200, '查询成功', FreeDistributionDb::releasePlan($openid) );
        }
       

}